ee2394
@@ -650,10 +650,12 @@
public static void main(String[] args) throws IOException, HiveException {
       conf.set("tmpfiles", files);
     }
 
-    String hadoopAuthToken =
-        System.getenv(ShimLoader.getHadoopShims().getTokenFileLocEnvName());
-    if(hadoopAuthToken != null){
-      conf.set("mapreduce.job.credentials.binary", hadoopAuthToken);
+    if(ShimLoader.getHadoopShims().isSecurityEnabled()){
+      String hadoopAuthToken =
+          System.getenv(ShimLoader.getHadoopShims().getTokenFileLocEnvName());
+      if(hadoopAuthToken != null){
+        conf.set("mapreduce.job.credentials.binary", hadoopAuthToken);
+      }
     }
 
     boolean isSilent = HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVESESSIONSILENT);
